In-Place vs Out-of-Place Algorithms
In-place: O(1) or O(log n) auxiliary space (e.g., Quick Sort's recursion stack), modifies input directly
Out-of-place: O(n) or more auxiliary space, typically creates new data structures
Trade-off: in-place algorithms save memory but may sacrifice stability or simplicity
In-place algorithms are useful in memory-constrained environments like embedded systems